/************************************************************************
                        StudentCourse.h.h - Copyright asaf
**************************************************************************/


#ifndef STUDENTCOURSE_H
#define STUDENTCOURSE_H
#include "../Shered/Object.h"
#include "CourseLectTimeSemeter.h"
#include "Person.h"
#include <string>
using namespace std;


/**
  * class StudentCourse
  * a student registered to a course recored
  * describes the courses a student as registered to (one recored per student registered to course).
  * describes if student as completed the course
  * main key is student ID,lecturer ID and academic time
  */

class StudentCourse : virtual public Object
{
public:
		// Constructors/Destructors
		//  
		//main ctor
		StudentCourse (Person &p,CourseLectTimeSemeter &c,bool comp=false);
		//copy ctor
		StudentCourse(const StudentCourse &s);


		//Empty Destructor
		virtual ~StudentCourse ( );
		
		//comparison operator with Person (on user ID key)
		bool operator==(const Person &rhs);
		//comparison operator with Course (on course ID key)
		bool operator==(const Course &rhs);
		//comparison operator(on main key)
		bool operator==(const StudentCourse &rhs);

		//getters/setters
		Person &getStudentRef();
		CourseLectTimeSemeter &getCltsRef();
		bool getComplete ();
		void setComplete (bool new_var);

private: 

		// Private attributes  
		//is the student completed this course
		bool m_Complete;
		//the user registered to course
		Person &m_StudentRef;
		//the course the user is registered to.
		CourseLectTimeSemeter &m_CltsRef;

		/**
		 * Empty Constructor
		 */
		StudentCourse ( );

	
		

	
};

#endif // STUDENTCOURSE_H
